package com.checking.attendance.service;
import com.checking.attendance.dao.LeaveMapper;
import com.checking.attendance.dao.UserMapper;
import com.checking.attendance.pojo.Leave;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LeaveService {
    @Autowired
    private LeaveMapper leaveMapper;

    public int insertSelective(Leave record){
        return leaveMapper.insertSelective(record);
    }

    public int deleteByPrimaryKey(String id){
        return leaveMapper.deleteByPrimaryKey(id);
    }

    public List<Leave> selectByPrimaryKeyUserIdAll(Leave record){
        return leaveMapper.selectByPrimaryKeyUserIdAll(record);
    }

    public List<Leave> selectByPrimaryAll(){
        return leaveMapper.selectByPrimaryAll();
    }

    public Leave selectByPrimaryKey(String id){
        return leaveMapper.selectByPrimaryKey(id);
    }

    public int teacherUpdateByPrimaryKeySelective(Leave record){
        return leaveMapper.teacherUpdateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKeySelective(Leave record){
        return leaveMapper.updateByPrimaryKeySelective(record);
    }


    public List<Leave> queryAllLeavePeople(String courseId){
        return leaveMapper.queryAllLeavePeople(courseId);
    }

}
